package services.cms;

import models.cms.PageDto;
import play.libs.F.Promise;
import services.ServiceException;
import services.core.CoreService;

public class PageService extends CoreService {
	
	public static Promise<PageDto> getPage(Integer pageId) throws ServiceException {
		return get(PageDto.class, "/page/id/", pageId.toString());
	}
	
	public static Promise<PageDto> getPageByName(String pageName) throws ServiceException {
		return get( PageDto.class, "/page/name/", pageName);
	}
	
	public static Promise<PageDto> getPageByContent(String pageName, String content) throws ServiceException {
		return get( PageDto.class, "/page/name/", pageName, content);
	}
	
}
